// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** addRolePermission POST /v1/easyapi/server/role/addRolePermission */
export async function addRolePermissionUsingPost(
  body: API.RolePermissionOperationParam,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/v1/easyapi/server/role/addRolePermission', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** deleteRole POST /v1/easyapi/server/role/deleteRole */
export async function deleteRoleUsingPost(
  body: API.RoleOperationParam,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/v1/easyapi/server/role/deleteRole', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** deleteRolePermission POST /v1/easyapi/server/role/deleteRolePermission */
export async function deleteRolePermissionUsingPost(
  body: API.RolePermissionOperationParam,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/v1/easyapi/server/role/deleteRolePermission', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** listPermission POST /v1/easyapi/server/role/listPermission */
export async function listPermissionUsingPost(
  body: API.RoleOperationParam,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseListPermissionVo_>('/v1/easyapi/server/role/listPermission', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** listRoleExPermission POST /v1/easyapi/server/role/listRoleExPermission */
export async function listRoleExPermissionUsingPost(
  body: API.RoleOperationParam,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseListPermissionVo_>(
    '/v1/easyapi/server/role/listRoleExPermission',
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** pageRole POST /v1/easyapi/server/role/pageRole */
export async function pageRoleUsingPost(body: API.PageRoleParam, options?: { [key: string]: any }) {
  return request<API.BaseResponsePagePageRoleVo_>('/v1/easyapi/server/role/pageRole', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** saveRole POST /v1/easyapi/server/role/saveRole */
export async function saveRoleUsingPost(body: API.RoleAddParam, options?: { [key: string]: any }) {
  return request<API.BaseResponseBoolean_>('/v1/easyapi/server/role/saveRole', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
